Skip to content

Conversation

Xazax-hun
Copy link
Contributor

@Xazax-hun Xazax-hun commented Aug 7, 2025

Explanation: The original code had the assumption we only import modules. However, there is a flag to import an umbrella header in which case the clang nodes have no owning module. This PR prevents a null dereference in that case. The problem affects the users of C++ interop who also use the umbrella header feature (-import-objc-header flag).
Issues: rdar://157489426
Original PRs: #83540
Risk: Low, added a check to avoid null dereference.
Testing: Added a compiler test.
Reviewers: @egorzhdan

…nterop

Explanation: The original code had the assumption we only import
modules. However, there is a flag to import an umbrella header in which
case the clang nodes have no owning module. This PR prevents a null
dereference in that case.
Issues: rdar://157489426
Original PRs: swiftlang#83540
Risk: Low, added a check to avoid null dereference.
Testing: Added a compiler test.
Reviewers: @egorzhdan
@Xazax-hun Xazax-hun requested a review from a team as a code owner August 7, 2025 15:02
@Xazax-hun Xazax-hun added c++ interop Feature: Interoperability with C++ 🍒 release cherry pick Flag: Release branch cherry picks swift 6.2 labels Aug 7, 2025
@Xazax-hun
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@nkcsgexi nkcsgexi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a safe change.

@Xazax-hun Xazax-hun merged commit 5cc6f24 into swiftlang:release/6.2 Aug 9, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++ 🍒 release cherry pick Flag: Release branch cherry picks swift 6.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants